<template>
  <div>
    <msg :title="title" :description="description">
      <template slot="buttons">
        <flexbox>
          <flexbox-item>
            <x-button type="primary" @click.native="loginHandle">允许</x-button>
          </flexbox-item>
          <flexbox-item>
            <x-button type="warn">拒绝</x-button>
          </flexbox-item>
        </flexbox>
      </template>
    </msg>
  </div>
</template>

<script>
import {getToken} from '@/utils'
import {Flexbox, FlexboxItem} from 'vux'
  export default {
    name:"login",
    data () {
      return {
        description:'允许获得你的公开信息（昵称，头像等）',
        title:'微信认证登录',
        icon: ''
      }

    },
    components: {
      Flexbox,
      FlexboxItem
    },
    created(){
    /*  if(getToken()){
        this.$router.push('/');
      }*/
    },
    methods:{
      loginHandle(){
       location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxee7ebdd886b8b2b6&redirect_uri=http://fengfeng.tunnel.qydev.com&response_type=code&scope=snsapi_userinfo&state=STATE&connect_redirect=1#wechat_redirect"
      },

    }
  }
</script>
<style lang="less">


</style>
